<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button class="btn">打开</button>
</body>
<script src="./dist/ScreenStatus.js"></script>
<script>
    let Screen = new ScreenStatus(handlerError);
    function fn1() {
        console.log('123')
    }
    function fn2() {
        document.title = '页面不可见';
        console.log('456')
    }
    function fn3() {
        document.title = '页面可见';
        console.log('789')
    }
    function fn4() {
        console.log('结束')
    }
    function handlerError() {
        console.log('error')
    }

    // let deleteFn1 = Screen.onShow(fn1)
    Screen.onShow(fn3)
    Screen.onBlur(fn2)
    // Screen.onBlur(fn4)

    Screen.exitFullScreenCallback(fn1)
    Screen.enterFullScreenCallback(fn4)



</script>

</html>